package org.third.common.domain;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "suite_installation")
public class SuiteInstallation {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id") 
	private Long id;

	@Column(name = "file_names")
	@Lob
	private String fileNames;
	
	@ManyToOne(cascade=CascadeType.ALL)
	private Deployment deployment;

	//one-way one-to-one, hold KubeBatchJob Id
	@OneToOne(cascade=CascadeType.ALL,fetch = FetchType.LAZY)
	@JoinColumn(name = "kube_batch_job_id")
	private KubeBatchJob  kubeBatchJob;
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getFileNames() {
		return fileNames;
	}

	public void setFileNames(String fileNames) {
		this.fileNames = fileNames;
	}

	public Deployment getDeployment() {
		return deployment;
	}

	public void setDeployment(Deployment deployment) {
		this.deployment = deployment;
	}

	public KubeBatchJob getKubeBatchJob() {
		return kubeBatchJob;
	}

	public void setKubeBatchJob(KubeBatchJob kubeBatchJob) {
		this.kubeBatchJob = kubeBatchJob;
	} 

}

